﻿using DatabaseAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Text;

namespace Liguo.Store
{
    public partial class Navigation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public String GetGoodsTypes()
        {
            StringBuilder types = new StringBuilder();
            SqlIt sql = new SqlIt();
            DataSet ds = sql.SelectAll("GoodsType");
            int count = ds.Tables[0].Rows.Count;
            for (int i = 0; i < count - 1; i++)
            {
                types.Append(ds.Tables[0].Rows[i][0].ToString());
                types.Append(",");
                types.Append(ds.Tables[0].Rows[i][1].ToString());
                types.Append(",");
            }
            types.Append(ds.Tables[0].Rows[count - 1][0].ToString());
            types.Append(",");
            types.Append(ds.Tables[0].Rows[count - 1][1].ToString());
            return types.ToString();
        }
    }
}